<template>
  <form>
    <input  v-model="inp1" :autofocus="tr1"  maxlength="1" type="text" @onblur="jiba">
    <input v-model="inp2" :autofocus="tr2"   maxlength="1" type="text">
    <input  v-model="inp3" :autofocus="tr3"   maxlength="1" type="text">
    <input  v-model="inp4" :autofocus="tr4"   maxlength="1" type="text">
  </form>
</template>
<style scoped>
</style>
<script type="text/babel">
  // import you from  './auto'\
  export default {
    data(){
      return {
        tr1:true,
        tr2:false,
        tr3:false,
        tr4:false,
        tnp1:'',
        tnp2:'',
        tnp3:'',
        tnp4:'',

      }
    },
    methods: {
      jiba(){
        if(tnp1!=''){
          this.tr1=false
          this.tr2=true
        }else{
          this.tr1=true
          this.tr2=false
        }
      },
      setFocusIndex(actionType,index) {
        if (actionType === 'jump') {
          this.currentIndex = index
          this.currentIndex++
          this.actionType = actionType
        }
        this.focusCtrl++

      }
    }
  }
</script>
